home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 1833 / 1833.xpi / chrome / yoono.jar / content / yoono / bookmarks / prompthistory.xul < prev   
Extensible Markup Language  |  2009-12-16  |  2KB  |  63 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE window SYSTEM "chrome://yoono/locale/bookmarksdlg.dtd">
  3.  
  4. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  5.  
  6. <dialog 
  7.    id="yoono-dialog-prompthistory"
  8.    title="&yoono.prompthistory.title;"
  9.    orient="vertical"
  10.    buttons="accept,cancel"
  11.    ondialogaccept="return onAcceptDialog()"
  12.    ondialogcancel="return onCancelDialog()"
  13.    onload="onInitDialog()"
  14.    persist="screenX screenY"
  15.    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  16.       
  17.    <script type="application/javascript">
  18.    <![CDATA[
  19.      var args;
  20.      var textbox;
  21.      var bundle;
  22.    
  23.      function onInitDialog()
  24.      {
  25.        textbox  = document.getElementById("textbox");
  26.        bundle   = document.getElementById("bundle");
  27.         
  28.        args = window.arguments[0];
  29.      }
  30.      
  31.      function onCancelDialog()
  32.      {
  33.        args.cancel = true;
  34.      }
  35.      
  36.      function onAcceptDialog()
  37.      {
  38.        var value = textbox.value;
  39.        
  40.        if(String(value).match(/\d\d?/)) {
  41.           value = Number(value);
  42.           if(value > 1) {
  43.              args.cancel = false;
  44.              args.value  = value;
  45.              return true;
  46.           }
  47.        }
  48.      
  49.        alert(bundle.getString("maxhistory.warning"));
  50.        return false;
  51.      }
  52.    ]]>
  53.    </script>
  54.  
  55.    <stringbundle id="bundle" src="chrome://yoono/locale/bookmarks.properties"/>
  56.  
  57.    <hbox align="center">
  58.      <label value="&yoono.prompthistory.label;"/>
  59.      <textbox id="textbox" style="width:3em"/>
  60.    </hbox>
  61.  
  62. </dialog>
  63.